package com.fh.apientity;

public class MergedResponse <T> {
	 private String status;
	    private String ch;
	    private String ts;
	    public String errCode;
	    public String errMsg;
	    public T data;
	    public T checkAndReturn() {
	        if ("ok".equals(status)) {
	            return data;
	        }
	        throw new ApiException(errCode, errMsg);
	    }
	    public String getCh() {
			return ch;
		}

		public void setCh(String ch) {
			this.ch = ch;
		}

		public String getStatus() {
			return status;
		}

		public void setStatus(String status) {
			this.status = status;
		}

		public String getTs() {
			return ts;
		}

		public void setTs(String ts) {
			this.ts = ts;
		}

		public String getErrCode() {
			return errCode;
		}

		public void setErrCode(String errCode) {
			this.errCode = errCode;
		}

		public String getErrMsg() {
			return errMsg;
		}

		public void setErrMsg(String errMsg) {
			this.errMsg = errMsg;
		}

		
	    
	  

}
